﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using mvLibrary;
using mvLibrary.Helpers.Enums;

namespace fenk.Contable.Informes
{
    public partial class MayorAnaliticoGeneral : MultiAccountForm
    {
        public MayorAnaliticoGeneral()
        {
            InitializeComponent();
            this.InicializarComboBox(ref this.cbEmpresas);
        }

        private void txtCuentaHasta_Enter(object sender, EventArgs e)
        {
            this.txtCuentaHasta.Text = this.txtCuentaDesde.Text;
        }

        public override void BeforeSaveReport()
        {
            string reportName = string.Empty;
            Empresas_Reportes.TryGetValue((Empresas)cbEmpresas.SelectedIndex, out reportName);

            this.ReportType = (ReportFileFormat)Enum.Parse(typeof(ReportFileFormat), this.cboReportType.Text);
            UniItem.Replace(7, this.ReportType.ToString());
            UniItem.Replace(8,reportName);
        }
    }
}
